projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5324722
)
Fix maximum selection size reporting
author
Po Lu
<luangruo@yahoo.com>
Mon, 7 Mar 2022 05:09:07 +0000
(13:09 +0800)
committer
Po Lu
<luangruo@yahoo.com>
Mon, 7 Mar 2022 05:09:41 +0000
(13:09 +0800)
* src/xselect.c (selection_quantum): Take into account extended
request size.
src/xselect.c
patch
|
blob
|
history
diff --git
a/src/xselect.c
b/src/xselect.c
index 979f454948896e2079960a74f6d79f5e64781e0d..a88c15aa95b3df5a99f466b92b065c5551607232 100644
(file)
--- a/
src/xselect.c
+++ b/
src/xselect.c
@@
-98,7
+98,11
@@
static void lisp_data_to_selection_data (struct x_display_info *, Lisp_Object,
static int
selection_quantum (Display *display)
{
- long mrs = XMaxRequestSize (display);
+ long mrs = XExtendedMaxRequestSize (display);
+
+ if (!mrs)
+ mrs = XMaxRequestSize (display);
+
return (mrs < MAX_SELECTION_QUANTUM / X_LONG_SIZE + 25
? (mrs - 25) * X_LONG_SIZE
: MAX_SELECTION_QUANTUM);